package com.zy;

import java.util.Arrays;

/**
 * @Author Gong
 * @Description
 * @dATE 2021/11/29 16:32
 **/
public class Exapmple  extends Object {

    public static void main(String[] args) {
        String s = "abcdef";
        int length=s.length();
        StringBuffer result=new StringBuffer(length);
        for(int i=length-1;i>=0;i--){
            result.append(s.charAt(i));
        }

        System.out.println(result);
    }

    public static String AAA(String str) {
        char[] c = str.toCharArray();

        String s = "";
        for (int i = 0; i < c.length; i++) {
            s += c[c.length - i - 1];
        }
        System.out.println(s);
        return s;
    }
}
